/*
 * @Author: 吴让坤
 * @Date: 2023-03-18 00:14:32
 * @LastEditTime: 2023-03-18 23:42:38
 * @Description: 用户数据存储
 */
import type { userinfoType } from '@/typing/user'
import { defineStore } from 'pinia'

export const useUserInfo = defineStore('useUserInfo', () => {
  const userInfo = ref<userinfoType>({
    username: '',
    avater: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F8c13b4b6-f8f2-4fcc-a221-ade4963bbb96%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1681735495&t=f1b552cc62dea008df448ca276693f7d'
  })

  return { userInfo }
})
